package com.lovo.sscsys.remoteService;

import com.lovo.dto.PendingCommodityDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.List;
import java.util.Map;

/**
 * 指向商城后台系统的接口
 */
@FeignClient(name = "sscsys")
public interface IsscsysRemoteService {

    @ApiOperation(value = "查询未定价的商品")
    @GetMapping("sysgoods2/findByOriginal")
//    public List<Map<String, Object>> findByOriginal();
    public List<PendingCommodityDto> findByOriginal();

    @PutMapping("customer/updateState/{userName}/{state}")
    @ApiOperation(value = "修改状态")
    public void updateState (@PathVariable("userName") String userName,
                             @PathVariable("state") String state);

    @PutMapping("customer/updateGrade/{userName}/{grade}")
    @ApiOperation(value = "修改等级")
    public void updateGrade (@PathVariable("userName") String userName,
                             @PathVariable("grade") String grade);
}